/**
 * 
 */
package com.jquery.ui.dictionary;

/**
 * @author linyajun
 * 
 * @date	2013-9-24
 * @description   
 */
public enum IPositionEnum {

	left("left"),right("right"),top("top"),bottom("bottom"),center("center");
	private String position;
	private IPositionEnum(String position){
		this.position=position;
	}
	
	public static IPositionEnum  parseValue(String value){
		if (left.getPosition().equals(value)) {
			
			return IPositionEnum.left;
		}else if (right.getPosition().equals(value)) {
			return IPositionEnum.right;
		}else if (top.getPosition().equals(value)) {
			return IPositionEnum.top;
		}else if (bottom.getPosition().equals(bottom)) {
			return IPositionEnum.bottom;
		}else if (center.getPosition().endsWith(value)) {
			return center;
		}
		return left;
	}
	
	/**
	 * @return the position
	 */
	public String getPosition() {
		return position;
	}
	/**
	 * @param position the position to set
	 */
	public void setPosition(String position) {
		this.position = position;
	}
	
	
}
